package org.lanqiao.tjut.action;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.lanqiao.tjut.bean.AdminBean;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class CommentAction extends ActionSupport {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public String dispachOgnl(){
		// TODO 业务逻辑处理
		
		List<AdminBean> lst = new ArrayList<>();
		
		AdminBean admin1 = new AdminBean();
		admin1.setAdmins_name("小明");
		admin1.setAdmins_psw("222");
		lst.add(admin1);
		AdminBean admin2 = new AdminBean();
		admin2.setAdmins_name("xiaoli");
		admin2.setAdmins_psw("333");
		lst.add(admin2);
		// 业务逻辑处理完成之后，将数据保存到session中进行缓存
		Map<String,Object> mapSession = ActionContext.getContext().getSession();
		mapSession.put("lstAdmins", lst);
		return SUCCESS;
	}
}
